import { RMIObject } from "../../Engine/RMI/RMIObject";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqRewardHelper } from "../Public/SeqRewardHelper";
import { Exception } from "../../Framework/Util/Exception";
type int = number;
//class AMI_ITask_openTransport
    
    export  class AMI_ITask_openTransport extends RMIObject
    {
        constructor(arg1?: Function, arg2?: Function, arg3?: any)
        {
            super(arg1, arg2);
            this.userObject = arg3;
            this.callFunction = "openTransport";
            return;
        }

        public /* override */ __response(arg1: SerializeStream): void
        {
            var __is: SerializeStream;
            var count: int;
            var maxCount: int;
            var color: int;
            var cashPledge: int;
            var transportRewards: Array<any>;
            var maxFreeCount: int;
            var freeCount: int;
            var totalSeconds: int;
            var insure: int;
            var totalFulshCount: int;

            var loc1;
            count = 0;
            maxCount = 0;
            color = 0;
            cashPledge = 0;
            transportRewards = null;
            maxFreeCount = 0;
            freeCount = 0;
            totalSeconds = 0;
            insure = 0;
            totalFulshCount = 0;
            __is = arg1;
            try 
            {
                count = __is.readInt();
                maxCount = __is.readInt();
                color = __is.readInt();
                cashPledge = __is.readInt();
                transportRewards = SeqRewardHelper.read(__is);
                maxFreeCount = __is.readInt();
                freeCount = __is.readInt();
                totalSeconds = __is.readInt();
                insure = __is.readInt();
                totalFulshCount = __is.readInt();
            }
            catch (__ex)
            {
                this.cdeException(new Exception("ExceptionCodeSerialize", Exception.ExceptionCodeSerialize));
                return;
            }
            this.cdeResponse(count, maxCount, color, cashPledge, transportRewards, maxFreeCount, freeCount, totalSeconds, insure, totalFulshCount);
            return;
        }

        public cdeResponse(arg1: int, arg2: int, arg3: int, arg4: int, arg5: Array<any>, arg6: int, arg7: int, arg8: int, arg9: int, arg10: int): void
        {
            if (this._response)  
            {
                this._response.call(null, this, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
            }
            return;
        }
    }
